Skip to content

When default @SwiftName rules are being applied, this update changes the Swift names of inner Java interfaces and of types declared within Java interfaces. Previously, if an interface Bar was declared within a type Foo or a concrete type Bar was declared within an interface Foo, they would be translated to a top-level type with Swift name Bar. This could cause problems if another inner type with the same name was also promoted. Now the Swift type name in each of these cases will be formed by concatenating the outer and inner type names: FooBar. This matches KMP's Swift naming of inner interfaces and of concrete types within interfaces. - #2831

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_964107865

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Aug 13, 2026

Copy link
Copy Markdown

When default @SwiftName rules are being applied, this update changes the Swift names of inner Java interfaces and of types declared within Java interfaces. Previously, if an interface Bar was declared within a type Foo or a concrete type Bar was declared within an interface Foo, they would be translated to a top-level type with Swift name Bar. This could cause problems if another inner type with the same name was also promoted. Now the Swift type name in each of these cases will be formed by concatenating the outer and inner type names: FooBar. This matches KMP's Swift naming of inner interfaces and of concrete types within interfaces.

@copybara-service
copybara-service Bot force-pushed the test_964107865 branch 5 times, most recently from 16199b9 to 249a96a Compare August 20, 2026 04:28
@copybara-service copybara-service Bot changed the title This update changes the Swift names of types declared within Java interfaces when default @SwiftName rules are being applied. Previously, a type Bar declared within interface Foo would be translated to a top-level type with Swift name Bar. This could cause problems if another interface Biz also declared an inner type Bar. Now the Swift type name will be formed by concatenating the interface and inner type name: FooBar. This also matches KMP's Swift naming of inner types within interfaces. When default @SwiftName rules are being applied, this update changes the Swift names of inner Java interfaces and of types declared within Java interfaces. Previously, if an interface Bar was declared within a type Foo or a concrete type Bar was declared within an interface Foo, they would be translated to a top-level type with Swift name Bar. This could cause problems if another inner type with the same name was also promoted. Now the Swift type name in each of these cases will be formed by concatenating the outer and inner type names: FooBar. This matches KMP's Swift naming of inner interfaces and of concrete types within interfaces. Aug 20, 2026
…the Swift names of inner Java interfaces and of types declared within Java interfaces. Previously, if an interface Bar was declared within a type Foo or a concrete type Bar was declared within an interface Foo, they would be translated to a top-level type with Swift name Bar. This could cause problems if another inner type with the same name was also promoted. Now the Swift type name in each of these cases will be formed by concatenating the outer and inner type names: FooBar. This matches KMP's Swift naming of inner interfaces and of concrete types within interfaces.

PiperOrigin-RevId: 964107865
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant